package stringBuilder;

public class Demo03 {
  public static void main(String[] args) {
    StringBuilder sb = new StringBuilder();
    /**
     * StringBuilder拼接
     * append
     */
    sb.append("hhh");
    sb.append(123);
    System.out.println(sb);
    /**
     * StringBuilder反转
     * reverse
     */
    sb.reverse();
    System.out.println(sb);
    System.out.println("字符的个数：" + sb.length());
    /**
     * StringBuilder转字符串
     * toString
     */
    String s = sb.toString();
    System.out.println(s);
  }
}
